import { Modal } from "antd";
import React, { useState } from "react";

const DesignSetterModal = ({ children, trigger }) => {
const [open,setOpen] = useState(false);
const onClick = ()=>{
    setOpen(true)
}
  return (
    <>
      {React.cloneElement(trigger,{onClick})}
      <Modal footer={false} onCancel={()=>setOpen(false)} open={open}>{children}</Modal>
    </>
  );
};
export default DesignSetterModal;
